package net.dgg.dggcloud.core.exception;

/**
 * 异常基类，所有自定义的异常类均需要派生自该类
 *
 * @author 徐哲
 * @create 2017-11-02 16:17
 */
public class BaseException extends RuntimeException{

	/**
	 * 具体异常码
	 */
	private int code=0;

	public BaseException(String message,int code, Throwable cause) {
		super(message, cause);
		this.code=code;
	}

	public BaseException(int code,Throwable cause) {
		super(cause);
		this.code=code;
	}

	public BaseException(String message,int code) {
		super(message);
		this.code=code;
	}
	public BaseException(int code) {
		super("dgg异常");
		this.code = code;
	}

	public int getCode() {
		return code;
	}

	protected void setCode(int code){
		this.code=code;
	}
}